package net.oschina.thrift.client.support.pool.factory;

import net.oschina.thrift.client.support.config.TSConfig;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;

/**
 * 二进制协议的 PooledObjectFactory
 *
 * @author Arvin
 * @time 2017/3/1 20:16
 */
public class TBinaryProtocolTClientPooledObjectFactory extends AbstractTSocketTClientPooledObjectFactory {

    @Override
    protected TProtocol buildProtocol(TSConfig config, TTransport transport, TSocket socket) {
        return new TBinaryProtocol(transport);
    }

}